home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
graphic
/
tweak16b.zip
/
TWEAK.DOC
< prev
next >
Wrap
Text File
|
1993-11-29
|
43KB
|
1,055 lines
TWEAK 1.6ß - Mold your own VGA modes
by Robert Schmidt of Ztiff Zox Softwear, 1992-93
This program and the accompanying source files
are hereby donated to the public domain.
(for whatever that's worth...)
(Sorry for not page-formatting this doc. The headers can be found by
doing a text search with your favourite editor.)
Contents:
WHAT IS TWEAK, ANYWAY?
SUGGESTION BOX
DISCLAIMER
A QUICK PRIMER
WHAT HAS TWEAK GOT TO DO WITH THIS?
A COUPLE OF RULES
A TUTORIAL
EDITOR REFERENCE
FREQUENTLY ASKED QUESTIONS
THE TWEAK FILES
USING TWEAK MODES ON YOUR OWN
THE INCLUDED FILES
THE 'MISC' DIRECTORY
CREDITS
BIBLIOGRAPHY
HOW TO REACH ME
WHAT IS TWEAK, ANYWAY?
TWEAK is an utility to ease the work of twiddling with the registers on
a standard VGA compatible video card to produce and explore new, previously
undocumented screen modes with weird resolutions. You will want to
purchase a technical VGA reference to get the full potential out of
TWEAK, but I included some files to get you started (see the section
on the 'MISC' directory).
TWEAK.EXE is the main executable. This version is not compatible with
any versions prior to 1.0, so if you want to use files created by
version 0.9x, convert them with 09TO10.EXE.
Stop press! In the subdirectory XINTRO is an article which serves as
an introduction to programming in Mode X (320x240 with 256 colors).
Make sure you read this if you're new to tweaking and Mode X!
MODES.DOC describes some of the more exciting 256x256, 400x300
and 400x600 256-color modes!
SUGGESTION BOX
All suggestions to enhance or modify TWEAK are welcome, especially bug
reports/fixes. So are donations, for that matter. See e-mail and
snail-mail addresses at the end of this file.
Please send me any changes you make to enhance TWEAK or to make it
compatible with other compilers or video cards, and I will start
including conditional sections for each supported compiler.
Do *not* re-release the changed source without my permission.
Well, how can I stop ya...?
Any suggestions and contributions will be credited in subsequent
versions, although I can't guarantee that your ideas will actually be
used.
DISCLAIMER
I don't think this is neccessary in PD stuff, but everybody else does
it:
The author author of this archive has used his best efforts in
preparing it. However, the author makes no warranty of any kind,
expressed or implied, with regard to the programs, data or
documentation included with the archive. The author shall not be
liable in any event for incidental or consequential damages in
connection with, or arising out of, the furnishing, performance,
quality, or use of the programs, data or documentation included in this
archive.
Phew.
Some time ago, putting illegal or unsupported values or combinations
of such into the video card registers might prove hazardous to both
your monitor and your health. I have *never* claimed that bad things
can't happen if you use TWEAK, although I'm pretty sure it never will.
I've never heard of any damage arising from trying out TWEAK, or from
general VGA tweaking in any case. I did receive a mail from a person
whose monitor failed producing the correct colors, after using mode
X.
A QUICK PRIMER
You never heard about neither documented nor undocumented modes, you
say? Well, to begin with: Your VGA card has a number of registers
that control the way the card works. That is, how it is going to
translate the data that programs put into the video memory, to the
signals that produce text and/or graphics on your monitor.
The standard interface to a video card on all IBM compatible PCs is the
BIOS, which consists of several device independant routines for setting
screen modes, moving the cursor, writing text, scrolling blocks of text
etc. The BIOS also takes care of setting the appropriate registers at
appropriate times, for example when changing screen modes. That way,
programmers have a consistent interface to the VGA, and usually won't
need to tamper with the registers directly.
A screen mode specifies the resolution of the image you see on the
screen, i.e. the number of pixels (dots) horizontally and vertically,
the number of colors, and wether the screen should be capable of
showing just text, or if graphics are allowed. These things are
controlled by the VGA registers, and the BIOS contains a number of
predefined tables of register values for the standard VGA modes we've
all come to love and honour. Mode number 3, for example, is the 80
characters times 25 lines (80x25) text screen that most people use
daily. Mode number 19 (or 13h in hexadecimal) is the 256-color 320x200
mode used in most popular games supporting the VGA.
WHAT HAS TWEAK GOT TO DO WITH THIS?
Well, some people, me included, are of the 'power-hungry' breed. We want
to exploit the full potential of everything we get between our hands.
We think that the one 320x200 256-color mode supported by all standard VGA
BIOS'es is for wimps. Some guy came up with the idea of modifying the
register configuration, to achieve greater resolution and a different
video memory layout.
TWEAK grants you direct access to all the most significant registers
that control such things as resolution and colors. You may have thought
that your VGA was limited to 320x200 when it was displaying 256 colors?
Well, all VGAs are able to support no less than 400x600 in 256 colors.
(The problem is with the monitors, which might not be sophisticated
enough to support the relatively much higher clock frequency needed to
output that many pixels. My monitor flickers and rolls occasionaly.)
Most newer VGA cards' BIOSes add several enhanced modes not supported
by the standard VGA defined by IBM, for example text modes with 132
characters on each line, or graphics resolutions of 800x600, 1280x1024
and more. Such cards are usually referred to as Super VGAs. To make it
possible to produce such resolutions, video card developers has had to
add new registers to the set of registers defined by the VGA. TWEAK is
generally not able to support such extended registers, meaning that you
will not be able to tweak a Super VGA any more than is possible on a
standard VGA. Extensions that are provided by utilizing undefined bits
in the standard VGA registers are supported however. The included
Chips & Technologies specific 132x*.twk files are examples of such.
The main reason for not including Super VGA (SVGA) support is that
there are so many different SVGA standards. Nearly every developer has
their own standard. Also, I can see no real reason for wanting to tweak
any SVGAs, as the resolution dimensions they offer usually are far
superior to the VGA's resolutions. With tweaked VGA modes there's
a much higher propability that they will work on most VGAs and SVGA,
than tweaked SVGA modes.
If this is the first you have read about VGA registers and the BIOS,
TWEAK.EXE and this documentation alone is not enough to get you going.
You will need, and probably want, a somewhat technical reference to the
VGA, which explains all standard VGA registers and the meaning of every
contained bit. Although TWEAK doesn't support it, you'll probably want
a reference which also contains some discussion on Super VGAs, just for
your convenience when you want to program serious applications etc. If
you're of the adventurous breed, check out the VGA.TXT and VGABIOS.TXT
files included in the .\MISC directory.
You see, tweaking the VGA is not as simple as putting the horizontal
resolution in one register, the vertical in another and the number of
colours in yet another. Several registers has to be set to cooperating
values that work together to acheive what you want. Single bits has to
be toggled into the correct states